<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      template="/WEB-INF/facelets/student_template.xhtml">
    
    
        
            <ui:define name="content">  
                    <h:form id="theForm">

                    <p:dataTable value="#{studentBackingBean.stud.sCourses}" var="course">  

                        

                        <p:column sortBy="#{course.courseName}">  
                            <f:facet name="header">  
                                <h:outputText value="Course Name" />  
                            </f:facet>  
                            <h:outputText value="#{course.courseName}" />  
                        </p:column>  

                        <p:column sortBy="#{course.yearNumber}">  
                            <f:facet name="header">  
                                <h:outputText value="Year" />  
                            </f:facet>  
                            <h:outputText value="#{course.yearNumber}" />  
                        </p:column>  
                         <p:column sortBy="#{course.teacher}">  
                            <f:facet name="header">  
                                <h:outputText value="Teacher" />  
                            </f:facet>  
                            <h:outputText value="#{course.teacher.user.fname}" />  
                        </p:column> 

                    </p:dataTable>  
                </h:form>
            </ui:define> 
        
    
</ui:composition>


